/* 用水效率评价 */

Ext.create('Ext.data.Store', {
    storeId: 'wue_store1',
    fields: ['regNm', 'indIncWw', 'indWwDecp', 'gdpWw', 'gdpWwDecp', 'agrWwEff'],
    data: []
});
Ext.define('Admin.view.evaluation.wue.Wue', {
    extend: 'Ext.container.Container',
    xtype: 'wue',
    requires: ['Admin.view.evaluation.wue.WueController'],
    controller: 'wueController',
    layout: {
        type: 'vbox',
        align: 'stretch'
    },
    // userCLs: 'big-100 small-100',
    height: 200,
    autoLoad: true,
    margin: 10,
    items: [{
        height: 46,
        xtype: 'toolbar',
        layout: {
            type: 'hbox',
            align: 'stretch'
        },
        cls: 'shadow',
        margin: '0 0 10 0',
        border: 1,
        style: {
            borderColor: '#ccc',
            borderStyle: 'solid'
        },
        items: [{
            xtype: 'component',
            id: 'wueComboWrapper',
            maxWidth: 220,
            width: '15%'
        }, {
            xtype: 'component',
            width: '65%',
        }, {
            xtype: 'segmentedbutton',
            cls: 'x-box-item my-top-nav',
            id: 'wueSwitchBtns',
            docked: 'right',
            width: '20%',
            minWidth: 200,
            maxWidth: '20%',
            items: [{
                id: 'wueBtn1',
                text: '行政分区',
                pressed: true,
                listeners: {
                    "click": 'switchAdminRegion'
                }
            }, {
                id: 'wueBtn2',
                text: '水资源分区',
                listeners: {
                    "click": 'switchWaterRegion'
                }
            }]
        }]
    }, {
        flex: 1,
        title: '用水效率评价',
        xtype: 'grid',
        reference: 'wueGrid',
        cls: 'shadow',
        style: 'border: 1px solid #ccc',
        autoScroll: true,
        loadMask: true,
        stripeRows: true,
        columnLines: true,
        forceFit: true, //表格自适应
        columns: [{
            text: '分区',
            dataIndex: 'regNm',
            editor: 'textfield',
            align: 'center',
            style: 'background: #EEEEEE'
        }, {
            text: '万元工业增加值用水量',
            dataIndex: 'indIncWw',
            editor: 'textfield',
            align: 'center',
            style: 'background: #EEEEEE'
        }, {
            text: '万元工业增加值用水量较上一年降低比例（%）',
            dataIndex: 'indWwDecp',
            editor: 'textfield',
            align: 'center',
            style: 'background: #EEEEEE'
        }, {
            text: '万元GDP水量',
            dataIndex: 'gdpWw',
            editor: 'textfield',
            align: 'center',
            style: 'background: #EEEEEE'
        }, {
            text: '万元GDP水量较上一年降低比例（%）',
            dataIndex: 'gdpWwDecp',
            editor: 'textfield',
            align: 'center',
            style: 'background: #EEEEEE'
        }, {
            text: '农业灌溉有效水利用系数',
            dataIndex: 'agrWwEff',
            editor: 'textfield',
            align: 'center',
            style: 'background: #EEEEEE'
        }],
        store: Ext.data.StoreManager.lookup('wue_store1')
    }],
    listeners: {
        afterrender: 'initData'
    }
});